//
//  ATKit.swift
//  MySwiftObject
//
//  Created by wangws1990 on 2019/9/25.
//  Copyright © 2019 wangws1990. All rights reserved.
//

import UIKit

public extension UIView{
    static func xibName() -> String{
        let name = String(describing: self)
        return name
    }
    static func nibName() ->String {
        return xibName()
    }
    static func instanceView() -> Self{
        guard let _ = Bundle.main.url(forResource:nibName(), withExtension:"nib") else { return self.init() }
        let view = Bundle.main.loadNibNamed(nibName(), owner:self, options: nil)?.first
        return view as! Self
    }
}
